﻿using System.Windows;
using BlueMarble.Genesis.Infrastructure;
using System.Windows.Controls;

namespace BlueMarble.Genesis.Shell
{
    /// <summary>
    /// Interaction logic for ShellView.xaml
    /// </summary>
    public partial class View : Page, IShellView
    {
        protected IShellViewModel viewModel;

        public View()
        {
            InitializeComponent();
        }

        #region IShellView

        public IShellViewModel ViewModel
        {
            get
            {
                return viewModel;
            }

            set
            {
                viewModel = value;
            }
        }

        public void ShowView()
        {
            this.Dispatcher.BeginInvoke(
                new System.Action(
                    delegate() { Application.Current.RootVisual = this; }));
        }

        #endregion
    }
}
